home *** CD-ROM | disk | FTP | other *** search
/ Best of Shareware / Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso / mac / ZIPPED / DOS / GRAPHICS / POVSRC.ZIP / MACHINE.ZIP / AMIGA.ZIP / AMIGACON.H < prev    next >
C/C++ Source or Header  |  1992-07-05  |  6KB  |  137 lines

  1. /****************************************************************************
  2. *                   amigaconf.h
  3. *
  4. *  This module contains Amiga-specific defines, types, and other declarations.
  5. *  Rename to config.h when compiling for Amiga.
  6. *  from Persistence of Vision Raytracer 
  7. *  Copyright 1991 Persistence of Vision Team
  8. *---------------------------------------------------------------------------
  9. *  Copying, distribution and legal info is in the file povlegal.doc which
  10. *  should be distributed with this file. If povlegal.doc is not available
  11. *  or for more info please contact:
  12. *
  13. *       Drew Wells [POV-Team Leader] 
  14. *       CIS: 73767,1244  Internet: 73767.1244@compuserve.com
  15. *       Phone: (213) 254-4041
  16. * This program is based on the popular DKB raytracer version 2.12.
  17. * DKBTrace was originally written by David K. Buck.
  18. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  19. *
  20. *****************************************************************************/
  21. /* Below are several defines needed by the generic parts of POV.  You
  22. *   may redefine them as needed in this config.h file.
  23. *
  24. *   The following constants are needed by various POV modules.  Each has
  25. *   a default (shown below) which is will be defined in frame.h if you don't 
  26. *   define them here.
  27. *
  28. *   #define EPSILON 1.0e-10               - a small value used for POLY
  29. *   #define FILE_NAME_LENGTH 150          - default file name length
  30. *   #define HUGE_VAL 1.0e+17              - a really big number
  31. *   #define DBL_FORMAT_STRING "%lf"       - the string to use for scanfs of doubles
  32. *   #define DEFAULT_OUTPUT_FORMAT  'd'    - the default +f format
  33. *   #define RED_RAW_FILE_EXTENSION ".red" - for +fr, this is the extension for the
  34. *                                           red file
  35. *   #define GREEN_RAW_FILE_EXTENSION ".grn"  - ditto for the green file
  36. *   #define BLUE_RAW_FILE_EXTENSION ".blu"   - ditto again for the blue file
  37. *   #define FILENAME_SEPARATOR "/"        - the character that separates names
  38. *                                           in a path.
  39. *   #define CASE_SENSITIVE_DEFAULT 2     - controls case sensitivity in DAT files
  40. *   #define READ_FILE_STRING "rb"        - special binary (raw, uncooked) 
  41. *   #define WRITE_FILE_STRING "wb"         modes of fopen()
  42. *   #define APPEND_FILE_STRING "ab"
  43. *   #define NORMAL '0'                   - machine-specific PaletteOption settings 
  44. *   #define GREY   'G'
  45. *
  46. *   These routines are required by POV to compute trace times.  The defaults 
  47. *   shown below are defined in most versions of C.  You may redefine them if
  48. *   your compiler doesn't support these.  If time is completely unsupported 
  49. *   define them as 0.
  50. *
  51. *   #define START_TIME time(&tstart);     
  52. *   #define STOP_TIME  time(&tstop);
  53. *   #define TIME_ELAPSED difftime (tstop, tstart);
  54. *
  55. *   Note difftime can be replaced with: #define TIME_ELAPSED (tstop - tstart); 
  56. *   in some cases. 
  57. *
  58. *   These are optional routines that POV calls.  You may define them
  59. *   or if undefined they will be defined as empty in frame.h.
  60. *
  61. *   #define STARTUP_POVRAY             - first executable statement of main
  62. *                                           (useful for initialization)
  63. *   #define PRINT_OTHER_CREDITS           - used for people who extend the machine specific modules
  64. *                                           (put your own printf's here)
  65. *   #define TEST_ABORT                    - code to test for ^C or abort
  66. *                                           (called on each pixel)
  67. *   #define FINISH_POVRAY              - last statement before exiting normally
  68. *   #define COOPERATE                    - called for multi-tasking
  69. *  
  70. *   These items are standard on some C compilers.  If they are not defined
  71. *   on your compiler or are called something different you may define your 
  72. *   own or use the defaults supplied in frame.h as shown below.
  73. *
  74. *   #define DBL double                    - floating point precision
  75. *   #define ACOS acos                     - arc cosine of DBL
  76. *   #define SQRT sqrt                     - square root of DBL
  77. *   #define POW pow                       - x to the y power - x, y DBL
  78. *   #define COS cos                       - cosine of DBL
  79. *   #define SIN sin                       - sine of DBL
  80. *   #define labs(x) (long) ((x<0)?-x:x)   - Returns the absolute value of long integer x
  81. *   #define max (x,y) ((x<y)?y:x)         - greater of x and y
  82. *
  83. *   On some systems "sprintf" returns the string rather than the length
  84. *   of the string.  If the string is returned, define the following:
  85. *   #define STRLN(x) strlen(x)
  86. *
  87. *   #define setvbuf(w,x,y,z)              - some systems don't understand setvbuf.
  88. *                                           If not, just define it away - it's
  89. *                                           not critical to the raytracer.  It
  90. *                                           just buffers disk accesses.
  91. *   This macro controls prototyping and is required by POV.  Choose one
  92. *   of the two options below or if left undefined it will default to ANSI 
  93. *   in frame.h
  94. *
  95. *   #define PARAMS (x) x                  - do ANSI prototyping
  96. *   #define PARAMS (x) ()                 - do K&R non-ANSI prototyping
  97. *
  98. *   These allow command line vs non-command line versions and alternate
  99. *   main routines.  Normally they should be undefined.  Define them 1 if needed.
  100. *   #define ALTMAIN 1
  101. *   #define NOCMDLINE 1
  102. ****************************************************/
  103.  
  104. #include <dos.h>
  105. #include <stdlib.h>
  106. #ifdef M68881
  107. #include <m68881.h>
  108. #endif
  109.  
  110. /* For the Amiga, we can use ANSI prototype definitions. */
  111. #define PARAMS(x) x
  112.  
  113. #define EPSILON 1.0e-5
  114.  
  115. #define STARTUP_POVRAY amiga_init_POVRAY();
  116. #define TEST_ABORT chkabort();
  117.  
  118. /* Amiga wants prototypes for these standard routines */
  119. void main (int, char**);
  120. void exit(int);
  121. extern char *getenv PARAMS((char *str));
  122.  
  123. /**********************************
  124. *    The defines below have nothing to do with the generic part of POV.
  125. *    They are entirely machine specific.  In general do not include them 
  126. *    when porting to other platforms.
  127. ***********************************/
  128.  
  129. extern int _bufsiz;
  130.  
  131. int amiga_close_all(void);
  132.  
  133. void amiga_init_POVRAY PARAMS((void));
  134.  
  135. #define TIME_ELAPSED ((unsigned long) tstop - (unsigned long) tstart);
  136.